<template>
 
    <!-- 头部导航 -->
 
 <van-nav-bar title="我的交易" left-text="返回" left-arrow @click-left="toPersonalView">
      <!-- 页面导航 跳转页面-->
     </van-nav-bar>
  
  <van-tabs v-model:active="activeName">
    <van-tab title="我发布的" name="mytrade">
      <div>
        <Fabu></Fabu>
      </div>
    </van-tab>
    <van-tab title=" 我卖出的" name="selled">
      <div>
        <Selled></Selled>
      </div>
    </van-tab>
    <van-tab title="售后" name="returnorder">
      <div>
        <Buy></Buy>
      </div>
    </van-tab>
  </van-tabs>
</template>

<script setup>
import { useRouter } from 'vue-router'; //路由器
// 返回上一页面
import { ref } from 'vue';
import Fabu from '../components/Fabu.vue';
import Selled from '../components/Selled.vue';
import Buy from '../components/Buy.vue';
import OrderInfo from '../components/OrderInfo.vue';
const onClickLeft = () => history.back();
const router = useRouter(); //获取到 router 对象，用于编程式跳转导航
const activeName = ref('selled');
function toPersonalView() {
  router.push("/personal");
}
</script>

<style scoped lang="css">
.goods-card {
  margin: 0;
  background-color: white;
}
</style>